<h1 id="records-header">{{studentName}}'s Records<small class="text-muted text-break"> - {{courseId}}</small></h1>
<h2>Records in feedback sessions</h2>
<tm-loading-retry [shouldShowRetry]="hasStudentResultsLoadingFailed" [message]="'Failed to load student results'" (retryEvent)="loadStudentResults()">
  <div *tmIsLoading="isStudentResultsLoading">
    <div *ngFor="let session of sessionTabs" class="card card-default mb-4">
      <div class="card-header cursor-pointer" (click)="session.isCollapsed = !session.isCollapsed">
        <strong class="text-break">Feedback Session: {{ session.feedbackSession.feedbackSessionName }}</strong>
        <div class="card-header-btn-toolbar">
          <tm-panel-chevron [isExpanded]="!session.isCollapsed" chevronColor="black"></tm-panel-chevron>
        </div>
      </div>
      <div class="card-body" *ngIf="!session.isCollapsed" @collapseAnim>
        <tm-grq-rgq-view-responses *ngIf="session.responsesReceivedByStudent.length > 0"
                                   [session]="session.feedbackSession"
                                   [responses]="session.responsesReceivedByStudent" [groupByTeam]="false" [section]="" [sectionType]=""
                                   [isGrq]="false" [instructorCommentTableModel]="instructorCommentTableModel"
                                   (saveNewCommentEvent)="saveNewComment($event, session.feedbackSession.timeZone)"
                                   (deleteCommentEvent)="deleteComment($event)"
                                   (updateCommentEvent)="updateComment($event, session.feedbackSession.timeZone)"
                                   [isExpandAll]="true">
        </tm-grq-rgq-view-responses>
        <div *ngIf="session.responsesReceivedByStudent.length === 0" class="mb-3">
          No feedback responses for {{studentName}} ({{studentTeam}}) found.
        </div>
        <tm-grq-rgq-view-responses *ngIf="session.responsesGivenByStudent.length > 0"
                                   [session]="session.feedbackSession"
                                   [responses]="session.responsesGivenByStudent" [groupByTeam]="false" [section]="" [sectionType]=""
                                   [isGrq]="true" [instructorCommentTableModel]="instructorCommentTableModel"
                                   (saveNewCommentEvent)="saveNewComment($event, session.feedbackSession.timeZone)"
                                   (deleteCommentEvent)="deleteComment($event)"
                                   (updateCommentEvent)="updateComment($event, session.feedbackSession.timeZone)"
                                   [isExpandAll]="true"
        ></tm-grq-rgq-view-responses>
        <div *ngIf="session.responsesGivenByStudent.length === 0">
          No feedback responses from {{studentName}} ({{studentTeam}}) found.
        </div>
      </div>
    </div>
  </div>
</tm-loading-retry>
